package com.jeeplus.modules.guide.utils;

import com.jeeplus.modules.guide.entity.MobileQueueList;
import com.jeeplus.modules.guide.service.MobileQueueService;
import com.jeeplus.modules.sys.utils.UserUtils;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class TaskThread implements Runnable{
    private int start;
    private HSSFSheet sheet;
    List<MobileQueueList> list;
    HSSFRow row;
    public TaskThread(HSSFSheet sheet,List<MobileQueueList> list,int start){
        this.start = start;
        this.sheet = sheet;
        this.list = list;
    }
    public void run() {
        try {
            for(int key=0;key<list.size();key++){
                row = sheet.createRow(start);
                row.createCell(0).setCellValue(list.get(key).getNumber());
                row.createCell(1).setCellValue(list.get(key).getStatus());
                row.createCell(2).setCellValue(list.get(key).getDoStatus());
                row.createCell(3).setCellValue(list.get(key).getWino());
                row.createCell(4).setCellValue(list.get(key).getUserNo());
                row.createCell(5).setCellValue(list.get(key).getUserName());
                row.createCell(6).setCellValue(list.get(key).getTypeName());
                row.createCell(7).setCellValue(list.get(key).getCometime());
                row.createCell(8).setCellValue(list.get(key).getHjtime());
                row.createCell(9).setCellValue(list.get(key).getServertime());
                row.createCell(10).setCellValue(list.get(key).getEndtime());
                row.createCell(11).setCellValue(list.get(key).getPjstatus());
                start++;
            }
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

    }
}
